package edu.sctu.zhoumengxue.day201506.day20150602;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 * Created by user12 on 2015/6/9.
 */
public class ManageTime {
    SetTrianData setTrianData = new SetTrianData();
    SetPeopleData setPeopleData = new SetPeopleData();
    SimpleDateFormat simple = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    Date date = new Date();


    public String time;
    public void ifTime(){

        time = simple.format(date);
        System.out.println("进站时间为："+time);
    }

    public void getTIme(){

        int  start = setTrianData.SetTrianDataline1().get(setPeopleData.setPeopleData().get(0).getStart());
        int  end = setTrianData.SetTrianDataline1().get(setPeopleData.setPeopleData().get(0).getEnd());
        long sum =Math.abs(start-end)*2;

        Calendar calendar = Calendar.getInstance();
        calendar.add(Calendar.SECOND, (int) sum);
        System.out.println("出站时间为："+simple.format(calendar.getTime()));



    }

    public static void main(String[] args) {
        ManageTime manageTime = new ManageTime();
        manageTime.ifTime();
    }
}
